import { createRouter, createWebHistory } from "vue-router";
import Home from "../views/Home.vue";

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home
  },
  {
    path: "/jsx",
    name: "JSX",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () =>
      import(/* webpackChunkName: "jsx" */ "../views/JSX/Index.vue")
  },
  {
    path: "/tongxin",
    name: "TongXin",
    component: () =>
      import(/* webpackChunkName: "tongxin" */ "../views/TongXin/Index.vue")
  },
  {
    path: "/virtualList",
    name: "VirtualList",
    component: () =>
      import(/* webpackChunkName: "virtualList" */ "../views/虚拟列表/Index.vue")
  }
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
});

export default router;
